<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main2"/>
        <title>List User Order</title>
        <script type="text/javascript" src="${createLinkTo(dir:'js')}/prototype.js"></script>
        <script type="text/javascript" src="${createLinkTo(dir:'js')}/scriptaculous.js?load=effects,builder"></script>
		<style type="text/css">
			td {
				align: center;
				vertical-align: top;
			}
			.thead {
				background-color: #CCCCCC;
				font-weight: bold;
			}
			.total {
				color: red;
				height: 30px;
				background-color: #CCCCCC;
			}
		</style>
    </head>

    <body>
    
        <div class="leftBox">
            <h1>List Order</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            
            <div class="list">
                <table>
                    <tbody>
                    <tr>
                    	<td class=thead>Order ID</td>
                    	<td class=thead>Order Date</td>
                    	<td class=thead>Login</td>
                    	<td class=thead>Total Price (USD)</td>
                    	<td class=thead>Status</td>
                    </tr>
                    <g:each in="${row}" status="i" var="userOrder">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                           <td><a href="/PictureCentral/shoppingCart/listOrderLine?orderID=${userOrder.orderID}">${userOrder.orderID}</a></td>
                           <td>${userOrder.createdOn}</td>
                           <td>${userOrder.login}</td>
                           <td>${userOrder.totalPrice}</td>
                           <td>${userOrder.status}</td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <br/>
            <a href="javascript:history.back();">Back</a>
            
            <div id="OrderLineContent"></div>
            
        </div>

    </body>
</html>
